import axios from "axios";

const baseURL: string = "https://m1.apifoxmock.com/m2/";
const timeout: number = 5000;

const request = axios.create({
  baseURL,
  timeout,
});

// 请求拦截器
request.interceptors.request.use((config) => {
  return config;
});

// 响应拦截器
request.interceptors.response.use((res) => {
  return res.data;
});

export default request;
